﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics.Tracing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;

namespace Entity.Models
{
    [Table("AlarmRecord")]
    public class AlarmRecord
    {
        [Key]
        public string AlarmRecordId { get; set; }//varchar(50) PRIMARY KEY 记录Id(uuid)
        public string? CompanyNo { get; set; }//Varchar(50) FK:公司代码

        public DateTime? AlarmTime { get; set; }//DateTime idx:报警时间
        public int? AlarmWeek { get; set; }//int 周
        public int? EventLevelId { get; set; }//Int 报警(事件)等级
        public int? DealFlagTypeId { get; set; }//Int FK：处理状态
        public int? DeviceId { get; set; }//Int 设备Id
        public string? CommNo { get; set; }//Varchar(50) 通讯编号
        public string? AlarmContent { get; set; }//Varchar(1000)   报警内容
        public string? EventTypeNo { get; set; }//Varchar(50)     FK：事件编号
        public string? ProtocolNo { get; set; }//Varchar(50) FK：通讯协议编号
        public int? EventCode { get; set; }//int 原始事件代码
        public int? DutyOfficerId { get; set; }//Int 责任人Id
        public string? OfficerName { get; set; }//Varchar(50) 责任人
        public DateTime? DealTime { get; set; }//DateTime 处理时间
        public string? DealRamark { get; set; }//Varchar(1000)   处理备注
        public string? DealOfficer { get; set; }//Varchar(50) 处理人员
        public int? AlarmGroupId { get; set; }//Int FK：报警组Id
        public int? AlarmModelId { get; set; }//Int FK：报警模型Id
        public string? ExtData { get; set; }//json 扩展数据
    }
}
